package cn.edu.wynu.order;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Order(1)
public class StudentAspect2 {
    @Pointcut("execution(public void cn.edu.wynu.order.Student.badminton())")
    void pointCutBadminton() {}

    @Before("pointCutBadminton()")
    void beforeBadminton() {
        System.out.println("干饭！！");
    }

    @After("pointCutBadminton()")
    void afterBadminton() {
        System.out.println("睡觉");
    }
}
